#include <unistd.h>
#include <stdlib.h>

/*
 * #include <unistd.h>
 *
 * size_t read(int fildes, void *buf, size_t nbytes)
 * */

int main()
{
	char buf[128];
	int nread;
	
	nread = read(0, buf, 128);
	
	if(nread == -1)
		write(2, "A read error has occurred\n",26);

	if((write(1, buf, nread)) != nread)
		write(2, "A write error has occurred\n",27);

	exit(0);
}
